<script setup lang='ts'>
function print() {
    window.print()
}
</script>
 
<template>
    <div class="top">
        <div class="item">工单04256</div>
        <div class="pass">通过审核</div>
        <div class="failed">不通过</div>
    </div>
    <div class="content">
        <div class="left">
            <div class="title">上报信息</div>
            <div class="li">
                <div class="Ltitle">紧急程度</div>
                <div class="LValue" style="color:#e67e22">紧急</div>
            </div>
            <div class="li">
                <div class="Ltitle">上报时间</div>
                <div class="LValue">2023-10-19-10:30</div>
            </div>
            <div class="li">
                <div class="Ltitle">问题地点</div>
                <div class="LValue">7号楼2单元9层</div>
            </div>
            <div class="li">
                <div class="Ltitle">状况信息</div>
                <div class="LValue">走廊暖气管漏水严重</div>
            </div>
            <div class="li">
                <div class="Ltitle">上报人</div>
                <div class="LValue">李四</div>
            </div>
            <div class="li">
                <div class="Ltitle">上报人联系方式</div>
                <div class="LValue">13600000000</div>
            </div>
            <div class="li">
                <div class="Ltitle">上报方式</div>
                <div class="LValue">电话上报</div>
            </div>
            <div class="li">
                <div class="Ltitle">附件信息</div>
                <div class="imgBox">
                    <img src="@/assets/images/admin.png" alt="">
                    <img src="@/assets/images/admin.png" alt="">
                    <img src="@/assets/images/admin.png" alt="">
                    <img src="@/assets/images/admin.png" alt="">
                    <img src="@/assets/images/admin.png" alt="">
                </div>
            </div>
        </div>
        <div class="right">
            <div class="title">维修信息</div>
            <div class="liBox">
                <div class="li">
                    <div class="Ltitle">维修状态</div>
                    <div class="LValue" style="color:#10a7e2">已完成-待审核</div>
                </div>
                <div class="li">
                    <div class="Ltitle">处理时间</div>
                    <div class="LValue">2023-10-19</div>
                </div>
                <div class="li">
                    <div class="Ltitle">维修验收</div>
                    <div class="LValue">张二</div>
                </div>
                <div class="li">
                    <div class="Ltitle">处理方式</div>
                    <div class="LValue">物业维修</div>
                </div>
                <div class="li">
                    <div class="Ltitle">处理部门</div>
                    <div class="LValue">维修部</div>
                </div>
                <div class="li">
                    <div class="Ltitle">处理人员</div>
                    <div class="LValue">张三</div>
                </div>
            </div>
            <!-- 照片凭证 -->
            <div class="photo">
                <div class="title">照片凭证</div>
                <el-image v-for="item  in 5"
                    :src="'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg'" :zoom-rate="1.2"
                    :max-scale="7" :min-scale="0.2" :preview-src-list="[
                        'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg',
                        'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg',
                        'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg',
                        'https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg',
                        'https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg',
                        'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg',
                        'https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg',
                    ]" :initial-index="4" fit="cover" />
            </div>
            <!-- 耗材 -->
            <div class="consumables">
                <div class="title" style="font-size: 16px;">耗材</div>
                <el-table border height="300px" :data="[{ name: '暖气水管', num: 10, money: '30' }]" style="width: 100%">
                    <el-table-column align="center" prop="name" label="耗材名称" />
                    <el-table-column prop="num" align="center" label="个数" />
                    <el-table-column prop="money" align="center" label="价格/元" />
                </el-table>
            </div>
        </div>
    </div>
</template>
 
<style scoped lang="scss">
.top {
    width: 100%;
    height: 44px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;

    .item:nth-child(1) {
        width: 89%;
        height: 100%;
        background: #FFFFFF;
        border-radius: 10px;
        text-align: left;
        padding-left: 30px;
        line-height: 44px;
        font-size: 16px;
        box-sizing: border-box;
    }

    .pass {
        width: 5%;
        height: 100%;
        background: #FFFFFF;
        border-radius: 10px;
        line-height: 44px;
        font-size: 16px;
        box-sizing: border-box;
        text-align: center;
        font-weight: 600;
        cursor: pointer;

        &:hover {
            color: #fff;
            background-color: #02852eaf;
        }
    }
    .failed{
        width: 5%;
        height: 100%;
        background: #FFFFFF;
        border-radius: 10px;
        line-height: 44px;
        font-size: 16px;
        box-sizing: border-box;
        text-align: center;
        font-weight: 600;
        cursor: pointer;

        &:hover {
            color: #fff;
            background-color: #ff6e0dbe;
        }
    }
}

.content {
    display: flex;
    justify-content: space-between;
    width: 100%;

    .left {
        width: 19%;
        height: 100%;
        background: #FFFFFF;
        border-radius: 10px;
        padding: 20px;
        box-sizing: border-box;
        overflow: auto;

        .title {
            font-size: 18px;
            color: #000000;
            line-height: 24px;
            font-weight: 400;
        }

        .li {
            border-bottom: 1px solid #ececec;
            padding: 10px 0;
            line-height: 30px;

            .Ltitle {
                font-size: 12px;
                color: #6d6d6d;
            }

            .LValue {
                font-size: 16px;
            }

            &:last-child {
                .imgBox {
                    display: flex;
                    width: 100%;
                    height: 200px;
                    flex-wrap: wrap;
                    overflow: auto;

                    img {
                        height: 80px;
                        width: 80px;
                        margin: 5px;
                    }
                }

            }
        }
    }

    .right {
        width: 80%;
        height: 100%;
        background: #FFFFFF;
        border-radius: 10px;
        padding: 20px;
        box-sizing: border-box;

        .title {
            font-size: 18px;
            color: #000000;
            line-height: 24px;
            font-weight: 400;
        }

        .liBox {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;

            .li {
                border-bottom: 1px solid #ececec;
                padding: 10px 0;
                line-height: 30px;
                width: 33%;

                .Ltitle {
                    font-size: 12px;
                    color: #6d6d6d;
                }

                .LValue {
                    font-size: 16px;
                }

                &:last-child {
                    .imgBox {
                        display: flex;
                        width: 100%;
                        flex-wrap: wrap;
                        overflow: auto;

                        img {
                            height: 80px;
                            width: 80px;
                            margin: 5px;
                        }
                    }

                }
            }
        }

        .photo {
            border-bottom: 1px solid #d7d7d7;

            .title {
                font-size: 16px;
                margin: 20px 0;
            }

            .el-image {
                height: 70px;
                width: 140px;
                margin: 10px;
                border-radius: 10px;
            }
        }

    }
}

.consumables {
    .title {
        font-size: 2px;
        margin: 20px 0;
    }
}

.demo-image__error .image-slot {
    font-size: 30px;
}

.demo-image__error .image-slot .el-icon {
    font-size: 30px;
}

.demo-image__error .el-image {
    width: 100%;
    height: 200px;
}

.el-descriptions__label.el-descriptions__cell.is-bordered-label {
    background-color: #cc5c16 !important;
}


// 局部打印
@media print {
    body * {
        visibility: hidden;
    }

    //打印区
    .right,
    .right * {
        visibility: visible;
    }

    .right {
        position: absolute;
        left: 0;
        top: 0;
    }
}</style>